# Prompt: Restore a Website from Web Archive (Wayback Machine)

For sites the client has lost access to (expired domain, hosting shut down, original no longer live) that need to be rebuilt from an archived copy instead of a live source.

Copy this whole file, fill in the placeholders in **Inputs**, and paste it to your AI agent (one with browser automation / computer-use capability). This is self-contained — no other context is needed.

---

## Inputs (fill in before running)

- **Original domain (the lost site):** {ORIGINAL_DOMAIN}
- **Target website builder:** {BUILDER_URL}
- **Final domain after publishing:** {TARGET_DOMAIN}
- **Preferred snapshot date:** {a specific date, or leave blank — if blank, the agent will pick the most complete available snapshot itself}
- **Pages to keep:** {all / a specific list / first N}

---

## Task

Restore the website **{ORIGINAL_DOMAIN}** from its archived copy on **web.archive.org**, importing it into the website builder at **{BUILDER_URL}**. This is a restoration from an archive, not a live-site migration — expect more manual cleanup than a normal migration. Give a short status report after each step.

### 1. Find the best snapshot
1. Open `https://web.archive.org/web/{ORIGINAL_DOMAIN}` — the calendar view shows which dates were actually captured.
2. If the user gave a preferred date, start there and check whether that capture looks complete (not a blank page or an internal error). If it's unusable, or no date was given, evaluate the nearby available snapshots yourself and pick the most complete one — check that the homepage renders properly, styling loads, and images aren't broken.
3. **Important:** different pages of the site may have been captured on different dates. Where possible, pick snapshots close together in time so the restored site isn't a patchwork of very different eras. Keep track of which date(s) you ultimately used — you'll need this for the final report.
4. Take the specific snapshot URL in the form `https://web.archive.org/web/{TIMESTAMP}/{ORIGINAL_DOMAIN}` — that's what you import, not the bare `{ORIGINAL_DOMAIN}`.

### 2. Import
1. In the builder, start "Website Import" and paste the snapshot URL from step 1.
2. Wait for it to complete all stages. If progress looks stuck for more than 30–40 seconds, reload the builder page (don't cancel the import) and check progress again — this is normal importer behavior, not specific to archived sites.
3. After import, confirm you actually got the real site content, not an archive error page or a blank capture. If the snapshot turns out to be broken or incomplete, go back to step 1 and try a different date.

### 3. Strip out archive artifacts
This is the main difference from a normal migration — Wayback Machine injects its own code into every archived page:
1. Check the top and bottom of every imported page for the **Wayback Machine toolbar** (capture date banner, archive navigation controls). If it got pulled in as page content, remove it as its own block.
2. Check menu and in-text links: the archive rewrites original relative links into a `/web/{date}/...` format. If any links still point back to `web.archive.org` instead of your newly imported pages, re-point them to the correct page or remove them.
3. Check images and fonts — archives often have gaps (not everything gets captured). Replace broken images if a source is available, or remove them if not.

### 4. Trim to the requested page count
Same as a normal migration: delete unwanted pages via the page list / site structure settings. Tip: deleting a parent/folder page usually deletes its nested child pages in one action.

### 5. Check the navigation menu for broken links
Same as a normal migration — look for menu items pointing to removed pages or broken links (these can come from both step 4 and the archive artifacts in step 3), fix or remove them, and make sure the change is actually saved/applied.

### 6. SEO metadata
As with a normal migration — **title/description are often carried over, favicon and the social preview image (og:image) usually are not** and need to be set manually. Additionally for archived sites: check whether the Wayback Machine's own title/description leaked into the page (sometimes a captured page's title gets replaced with something like "Wayback Machine" instead of the original) — if so, set the correct title/description manually, cross-checking against the snapshot.

### 7. Publish
Publish the site and confirm {TARGET_DOMAIN} actually loads live.

### 8. Compare against the archived version
1. Open the same snapshot on web.archive.org next to the new site.
2. Compare key pages (homepage + one or two important ones) for content parity — keeping in mind some differences may come from real gaps in the archive rather than a migration mistake.

### 9. Final report
Summarize clearly:
- which date(s) the final site was assembled from (list all, if pages came from different snapshots);
- what could not be fully restored due to gaps in the archive (broken images, pages the archive never captured at all, etc.);
- whether all Wayback artifacts were removed (toolbar, leftover links back to archive.org);
- whether favicon/og:image were set;
- the link to the published site.

---

**Note to the agent:** this is a restoration from an archived copy, not a migration of a live site — some loss is unavoidable (pages the archive never captured, JS-loaded content that wasn't crawled, forms, product catalogs, etc.). Your job is to recover as much as realistically possible and **honestly list what could not be recovered**, rather than presenting a partial restoration as a complete one.
